package com.vlin.api.client;

import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;

public class Params {

	private Map<String, String > params = new ConcurrentHashMap<>();
	
	private Map<String, String>  headParams = new ConcurrentHashMap<>();
	
	public Map<String, String> getParams(){
		return this.params;
	}
	
	public Map<String, String> getHeadParams(){
		return this.headParams;
	}
	
	public void setParam(String key, String value) {
		this.params.put(key, value);
	}
	
	public void setHeadParam(String key, String value) {
		this.headParams.put(key, value);
	}
	
	public void setParams(Params params) {
		if(params != null) {
			for(Entry<String, String> entry : params.getHeadParams().entrySet()) {
				setHeadParam(entry.getKey(), entry.getValue());
			}
			for(Entry<String, String> entry : params.getParams().entrySet()) {
				setParam(entry.getKey(), entry.getValue());
			}
		}
	}
}
